<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- Head BEGIN -->
<head>
  <meta charset="utf-8">
  <title>深圳鹏博爱心互助协会</title>

  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <meta content="Metronic Shop UI description" name="description">
  <meta content="Metronic Shop UI keywords" name="keywords">
  <meta content="keenthemes" name="author">

  <meta property="og:site_name" content="-CUSTOMER VALUE-">
  <meta property="og:title" content="-CUSTOMER VALUE-">
  <meta property="og:description" content="-CUSTOMER VALUE-">
  <meta property="og:type" content="website">
  <meta property="og:image" content="-CUSTOMER VALUE-"><!-- link to image for socio -->
  <meta property="og:url" content="-CUSTOMER VALUE-">

  <link rel="shortcut icon" href="favicon.ico">
  <link href="/favicon.ico" rel="SHORTCUT ICON" type="image/ico">


  <!-- Global styles START -->          
  <link href="__ROOT__/static/shophome/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link href="__ROOT__/static/shophome/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
  <!-- Global styles END --> 
   
  <!-- Page level plugin styles START -->
  <link href="__ROOT__/static/shophome/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet">              
  <link href="__ROOT__/static/shophome/plugins/bxslider/jquery.bxslider.css" rel="stylesheet">
  <link rel="stylesheet" href="__ROOT__/static/shophome/plugins/layerslider/css/layerslider.css" type="text/css">
  <!-- Page level plugin styles END -->

  <!-- Theme styles START -->
  <link href="__ROOT__/static/shophome/css/style-metronic.css" rel="stylesheet" type="text/css">
  <link href="__ROOT__/static/shophome/css/style.css" rel="stylesheet" type="text/css">
  <link href="__ROOT__/static/shophome/css/style-responsive.css" rel="stylesheet" type="text/css">  
  <link href="__ROOT__/static/shophome/css/custom.css" rel="stylesheet" type="text/css">



    <link rel="stylesheet" href="__ROOT__/Application/Home/View/default/css/common.css" />
      <link rel="stylesheet" href="__ROOT__/Application/Home/View/default/css/base.css" />
    <link rel="stylesheet" href="__ROOT__/Application/Home/View/default/css/head.css" />

   <script src="__ROOT__/static/shophome/plugins/jquery-1.10.2.min.js"></script>
   
 <link href="__ROOT__/Public/Plus/css/hdjs.css" rel="stylesheet" type="text/css">
   <script src="__ROOT__/Public/Plus/js/hdjs.js" type="text/javascript"></script>
   <script src="__ROOT__/Public/Plus/layer/layer.js" type="text/javascript"></script>
   <!-- //公共的JS-FUNCTION函数 -->
   <script src="__ROOT__/Public/Plus/js/PublicVlidate.js" type="text/javascript"></script>
  <script type="text/javascript">
  layer.config({
      extend: ['skin/moon/style.css'], //加载新皮肤
      skin: 'layer-ext-moon' //一旦设定，所有弹层风格都采用此主题。
  });
  </script>

  <script type="text/javascript">
       var rooturl = "__ROOT__";
       var publicurl = "__ROOT__/Public/";
       var currCityId = "{$currCity['areaId']}";
       var currCityName = "{$currCity['areaName']}";
      // var numberItem = {$cartcnt};
      //城市JS
       // $(function() {
       //      $("img").lazyload({effect: "fadeIn",failurelimit : 1000,threshold: 200,placeholder:'__ROOT__/Application/Home/View/default/images/store_default_signlist.png'});
       // });
  </script>
<script src="__ROOT__/Application/Home/View/default/js/orders.js"></script>
<script src="__ROOT__/Application/Home/View/default/js/goods.js"></script>
  <script src="__ROOT__/Application/Home/View/default/js/common.js"></script>
  <!-- Theme styles END -->
</head>
<!-- Head END -->
<link href="__ROOT__/static/js/artDialog/skins/default.css{$js_debug}" rel="stylesheet" />
<!-- //城市三联 -->
<script src="__ROOT__/Public/Plus/js/region_select.js"></script>
<script type="text/javascript">
      //全局变量
      var GV = {
        DIMAUB: "__ROOT__/",
        JS_ROOT: "static/js/",
        TOKEN: ""
      };
    </script>
    <script src="__ROOT__/static/js/wind.js{$js_debug}"></script>
    <script src="__ROOT__/static/js/jquery.js{$js_debug}"></script>
    <script src="__ROOT__/static/js/common.js{$js_debug}"></script> 
<div style="height:30px;"></div>            
<div class="content-page" style="width:1150px;margin:0 auto;">
     <div class="nav" style="margin-bottom:10px;">
      <ul class="cc">
        <li class="current" style="float:left;margin-right:10px;"><a href="{:U('Recipients/apply')}" class="btn green"> <i class="fa fa-mail-reply-all"></i>返回列表</a></li>
        <!-- <li style="float:left"><a href="{:U('Recipients/addeitem')}" class="btn green">添加项目</a></li> -->
      </ul>
    </div>
      <div class="row margin-bottom-40">
            <div class="col-md-12 ">
               <!-- BLOCK START-->
                <div class="panel panel-default">   
                    <div class="panel-heading"><h3 class="panel-title">申请表修改</h3></div>
                    <div class="panel-body">
                     <form role="form" method="post" action="#" enctype="multipart/form-data" id="apply-form">
                     <!-- <form role="form" method="post" action="{:U('Admin/Recipients/editApply')}" enctype="multipart/form-data" id="apply-form"> -->

                        <div class="form-body">
                           <div class="form-group">
                              <label>申请的类型</label>
                              <select class="form-control input-medium" name="item">
                                 <option value="">请先选择申请的类型</option>
                                 <?php foreach ($item as $key => $v): ?>
                                    <option value="{$v.id}" <?php if($applyAr['item']==$v['id']){ echo "string";?> selected="selected" <?php } ?>>{$v.name}</option>
                                 <?php endforeach ?>
                              </select>
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">学生姓名</label>
                              <input type="text" placeholder="" value="{$applyAr.student_name}" id="student_name" class="form-control" name="student_name">
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                            <div class="form-group">
                              <label for="exampleInputEmail1">就读学校</label>
                              <input type="text" placeholder="" value="{$applyAr.student_school}" id="student_school" class="form-control" name="student_school">
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">身份证号</label>
                              <input type="text" placeholder="" value="{$applyAr.student_id_card}" id="student_school" class="form-control" name="student_id_card">
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                            <div class="form-group">
                              <label for="exampleInputEmail1">手机号</label>
                              <input type="text" placeholder="" value="{$applyAr.student_phone}" id="student_school" class="form-control" name="student_phone">
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">QQ号</label>
                              <input type="text" placeholder="" value="{$applyAr.qq_number}" id="student_school" class="form-control" name="qq_number">
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                          <div class="form-group">
                              <label for="exampleInputEmail1">学生图像</label>
                              <!-- <input type="field" placeholder="学生图像" id="student_ico" class="form-control"> -->

                              <div  style="text-align: left;border: 1px solid #dbdbdb;padding:5px;width:145px;" >
                                  <input type='hidden' name='smeta[thumb]' id='thumb' value='<?php echo $applyAr['smeta_thumb']; ?>'>
                                  <a href='javascript:void(0);' onclick="flashupload('thumb_images', '附件上传', 'thumb', thumb_images, '1,jpg|jpeg|gif|png|bmp,1,,,1', 'content', '12', 'b6ba209759e147124653ac77362ef2bd');
                                      return false;">

                                    <img src=' <?php echo $applyAr['smeta_thumb']; ?>' id='thumb_preview' width='135' height='113' style='cursor:hand' /></a>
                                  <!-- <input type="button" class="btn" onclick="crop_cut_thumb($('#thumb').val());return false;" value="裁减图片">  -->
                                 <!--  <input type="button"  class="btn" onclick="$('#thumb_preview').attr('src', '__STATIC__/images/icon/upload-pic.png');
                                      $('#thumb').val('');
                                      return false;" value="取消图片"> -->
                                </div>
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">学生姓别</label>
                             <select class="form-control input-medium" name="student_sex">
                                 <option value="">请先选择学生姓别</option>
                                    <option value="1" <?php if($applyAr['student_sex']==1){?> selected="selected" <?php } ?>>男</option>
                                    <option value="2" <?php if($applyAr['student_sex']==2){?> selected="selected" <?php } ?>>女</option>
                              </select>
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">民族</label>
                             <select class="form-control input-medium" name="student_nation">
                                 <option value="">请先选择学生民族</option>
                                 <?php foreach ($nation as $key => $v): ?>
                                    <option value="{$v.id}" <?php if($applyAr['student_nation']==$v['id']){?> selected="selected" <?php } ?>>{$v.name}</option>
                                 <?php endforeach ?>
                                  
                              </select>
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">学生年龄</label>
                             
                                  <input type="text" placeholder="" value="{$applyAr.student_age}" name="student_age" id="student_age" class="form-control">
                              
                           </div>
                           <div class="form-group">
                              <label for="exampleInputEmail1">学生年级</label>
                            <!-- <input type="text" placeholder="" value="{$applyAr.student_grade}" name="student_grade" id="student_grade" class="form-control"> -->
                             <select class="form-control input-medium" name="student_grade">
                                 <!-- <option value="">请先选择学生年级</option> -->
                                 <?php foreach (C('STUDENT_GRADE') as $k => $v): ?>
                                    <option value="{$k}" <?php if($applyAr['student_grade']==$k){?> selected="selected" <?php } ?>>{$v}</option>
                                 <?php endforeach ?>
                                   
                                 
                              </select>
                              <!-- <span class="help-block">A block of help text.</span> -->
                           </div>
                            <div class="form-group">
                              <label for="exampleInputEmail1">学生地址(如果村市不全或者没有找到，可以在祥细地址中填写)  <a href="javascript:;" class="btn green change-par-ad">修改省市</a> </label>
                              <div class="select-area" style="display:none;">
                                 <select name="province" id="location_p"  class="form-control input-medium">
                                </select>
                                <select name="city" id="location_c"  class="form-control input-medium">
                                </select>
                                <select name="town" id="location_a"  class="form-control input-medium">
                                </select> 
                                 <script type="text/javascript">
                                  new PCAS('province', 'city', 'town', '广东省', '', '');
                                  var sqlProv =$.trim('{$applyAr.province}');
                                  var sqlCity =$.trim('{$applyAr.city}');
                                  var sqlTown =$.trim('{$applyAr.town}');
                               </script>
                              </div>
                              <div class="input-area">
                               <input type="text" readonly=""  value="{$applyAr.province}" name="province" id="province" class="form-control"  >
                               <input type="text" readonly="" value="{$applyAr.city}" name="city" id="city" class="form-control">
                               <input type="text" readonly=""  value="{$applyAr.town}" name="town" id="town" class="form-control">
                              </div>
                              
						                	<script type="text/javascript">
                              $('.change-par-ad').click(function(event) {
                               $('.select-area').show()
                               $('.input-area').remove()
                              });
                              </script>
                            
                             
                            
                               <input type="text" placeholder="" value="{$applyAr.student_address}" id="student_address" class="form-control" name="student_address">
                            
                            
                           </div>
                           <div class="form-group">
                              <label>家长姓名</label>
                              <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-user"></i></span>
                                <input type="text" placeholder="" value="{$applyAr.patriarch_name}" class="form-control" name="patriarch_name">
                              </div>
                           </div>
                             <div class="form-group">
                              <label>家长电话</label>
                              <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-phone"></i></span>
                                <input type="text" placeholder="" class="form-control" name="patriarch_phone" value="{$applyAr.patriarch_phone}">
                              </div>
                           </div>
                           <div style="border:1px solid #3E4D5C;padding:10px;">
                           <h5>家庭成员</h5>
                           <?php foreach ($fa as $k => $v): ?>
                           	<div class="family_areas" style="border:1px dotted #ddd;padding:10px;">
                                       <div class="form-group">
                                       <label for="exampleInputPassword1">姓名</label>
                                       <div class="input-group">
                                          <input type="text" placeholder="" value="{$v.family_name}" id="exampleInputPassword1" class="form-control" name="family_name[]">
                                          <span class="input-group-addon"></span>
                                       </div>
                                  </div>
                                    <div class="form-group">
                                       <label for="exampleInputPassword1">称呼</label>
                                       <div class="input-group">
                                          <input type="text" placeholder="" value="{$v.family_relation}" id="exampleInputPassword1" class="form-control" name="family_relation[]">
                                          <span class="input-group-addon"></span>
                                       </div>
                                  </div>
                                    <div class="form-group">
                                       <label for="exampleInputPassword1">年龄</label>
                                       <div class="input-group">
                                          <input type="text" placeholder="" value="{$v.family_age}" id="exampleInputPassword1" class="form-control" name="family_age[]">
                                          <span class="input-group-addon"></span>
                                       </div>
                                  </div>
                                   <div class="form-group">
                                       <label for="exampleInputPassword1">职业，及其它情况</label>
                                       <div class="input-group">
                                          <input type="text" placeholder="" value="{$v.family_remark}" id="exampleInputPassword1" class="form-control" name="family_remark[]">
                                          <span class="input-group-addon"></span>
                                       </div>
                                  </div>
                                  <div class="line" style="height:20px; border-top:1px solid #ccc;"></div>
                              </div>
                           <?php endforeach ?>
                              
                              <a class="btn green add-family-info" style="margin-top:10px;" href="javascript:;" >增加成员关系</a>
                           
                              <script type="text/javascript">

                              $('.add-family-info').click(function(event) {
                                 var str  = '<div class="form-group">\
                                    <label for="exampleInputPassword1">姓名</label>\
                                    <div class="input-group">\
                                       <input type="text" placeholder="" id="exampleInputPassword1" class="form-control" name="family_name[]">\
                                       <span class="input-group-addon"></span>\
                                    </div>\
                               </div>\
                                 <div class="form-group">\
                                    <label for="exampleInputPassword1">称呼</label>\
                                    <div class="input-group">\
                                       <input type="text" placeholder="" id="exampleInputPassword1" class="form-control" name="family_relation[]">\
                                       <span class="input-group-addon"></span>\
                                    </div>\
                               </div>\
                                 <div class="form-group">\
                                    <label for="exampleInputPassword1">年龄</label>\
                                    <div class="input-group">\
                                       <input type="text" placeholder="" id="exampleInputPassword1" class="form-control" name="family_age[]">\
                                       <span class="input-group-addon"></span>\
                                    </div>\
                               </div>\
                                <div class="form-group">\
                                    <label for="exampleInputPassword1">职业，及其它情况</label>\
                                    <div class="input-group">\
                                       <input type="text" placeholder="" id="exampleInputPassword1" class="form-control" name="family_remark[]">\
                                       <span class="input-group-addon"></span>\
                                    </div>\
                               </div>\
                               <div class="line" style="height:20px; border-top:1px solid #ccc;"></div>';
                                $('.family_areas').append(str);
                              });

                              </script>
                           </div>
                           

                           <div class="form-group" style="margin-top:10px;">
                              <label>养殖(种植)收入(年)</label>
                              <div class="input-icon">
                                 
                                 <input type="text" placeholder="" value="{$ex.culture_earnings}" class="form-control" name="culture_earnings">
                              </div>
                           </div>
                           <div class="form-group" style="margin-top:10px;">
                              <label>打工收入(年)</label>
                              <div class="input-icon">
                                
                                 <input type="text" placeholder="" class="form-control" value="{$ex.work_earnings}" name="work_earnings">
                              </div>
                           </div>
                            <div class="form-group" style="margin-top:10px;">
                              <label>养老金补助(年)</label>
                              <div class="input-icon">
                               
                                 <input type="text" placeholder="" class="form-control" value="{$ex.pension_earnings}" name="pension_earnings">
                              </div>
                           </div>
                           <div class="form-group" style="margin-top:10px;">
                              <label>低保补助(年)</label>
                              <div class="input-icon">
                                 
                                 <input type="text" placeholder="" class="form-control" value="{$ex.allowances_earnings}" name="allowances_earnings">
                              </div>
                           </div>
                           <div class="form-group" style="margin-top:10px;">
                              <label>其他收入(年)</label>
                              <div class="input-icon">
                               
                                 <input type="text" placeholder="" class="form-control" value="{$ex.others_earnings}" name="others_earnings">
                              </div>
                           </div>

                           <div class="form-group">
                              <label>家庭具体情况详细描述</label>
                              <div class="input-icon right">
                                 
                                 <textarea class="form-control" name="family_describle" rows="3">{$ex.family_describle}</textarea>
                              
                                 
                              </div>
                           </div>
                           <div class="form-group">
                              <label>有无其它公益组织资助(如果有请列出具体资助组织及资助金额)</label>
                              <div class="input-icon right">
                                 
                                 <textarea class="form-control" name="other_imburse_remark" rows="3">{$ex.other_imburse_remark}</textarea>
                              </div>
                           </div>
                           <div class="form-group" style="margin-top:10px;">
                              <label>家庭生活支出(年)</label>
                              <div class="input-icon">
                                
                                 <input type="text" placeholder="" value="{$ex.living_expenditure_family}" class="form-control" name="living_expenditure_family">
                              </div>
                           </div>
                           <div class="form-group" style="margin-top:10px;">
                              <label>学生费用支出(年)</label>
                              <div class="input-icon">
                                
                                 <input type="text" value="{$ex.tuition_expenditure_family}" placeholder="学生费用支出(年)" class="form-control" name="tuition_expenditure_family">
                              </div>
                           </div>
                            <div class="form-group" style="margin-top:10px;">
                              <label>其他支出(年)</label>
                              <div class="input-icon">
                                
                                 <input type="text" placeholder="" class="form-control" value="{$ex.other_expenditure_family}" name="other_expenditure_family">
                              </div>

                           </div>




                           

  
                           <div style="margin-top:10px;margin-bottom:10px;">
                                 <h5>学生上期期末考试及学习情况</h5>
                                  <div class="form-group">
                                    <label>语文</label>
                                    <input type="text" placeholder="" value="{$score.chinese_curricula}" class="form-control spinner" name="chinese_curricula"> 
                                  </div>
                                  <div class="form-group">
                                    <label>数学</label>
                                    <input type="text" placeholder="" value="{$score.math_curricula}" class="form-control spinner" name="math_curricula"> 
                                  </div>
                                  <div class="form-group">
                                    <label>英语</label>
                                    <input type="text" placeholder="" value="{$score.english_curricula}" class="form-control spinner" name="english_curricula"> 
                                  </div>
                                  <div class="form-group">
                                    <label>班级排名</label>
                                    <input type="text" placeholder="" value="{$score.class_rank}" class="form-control spinner" name="class_rank"> 
                                  </div>
                                  <div class="form-group">
                                    <label>年级排名</label>
                                    <input type="text" placeholder="" value="{$score.school_rank}" class="form-control spinner" name="school_rank"> 
                                  </div>
                                  <div class="form-group">
                                    <label>班主任姓名</label>
                                    <input type="text" placeholder="" value="{$teacher.teacher_name}" class="form-control spinner" name="teacher_name"> 
                                  </div>
                                   <div class="form-group">
                                    <label>班主任电话</label>
                                    <input type="text" placeholder="" value="{$teacher.teacher_phone}" class="form-control spinner" name="teacher_phone"> 
                                  </div>
                                   <div class="form-group">
                                    <label>班主任对学生的综合评价</label>
                                    <input type="text" placeholder="" value="{$teacher.teacher_remark}" class="form-control spinner" name="teacher_remark"> 
                                  </div>      
                           </div>
                           <div>
                               <div class="form-group">
                                    <label>申请人</label>
                                    <input type="text" placeholder="" class="form-control spinner" name="apply_name" value="{$applyAr.apply_name}"> 
                                  </div>
                                  <div class="form-group">
                                    <label>申请人电话</label>
                                    <input type="text" placeholder="" value="{$applyAr.apply_phone}" class="form-control spinner" name="apply_phone"> 
                                  </div>
                                  <div class="form-group">
                                    <label>申请人邮箱</label>
                                    <input type="text" placeholder="" value="{$applyAr.apply_email}" class="form-control spinner" name="apply_email"> 
                                  </div>
                           </div>
                           <input type="hidden" value="{$id}" name="id" >
                           <input type="hidden" name="exid" value="{$ex.id}">
                            <input type="hidden" name="teacherid" value="{$teacher.id}">
                             <input type="hidden" name="scoreid" value="{$score.id}">
                             <input type="submit" class="btn blue sublimt-from" value="提交">
                             <!--  <a class="btn blue sublimt-from" type="submit" href="javascript:;">提交</a> -->
                                 
                     </form>
                   </div>
                </div>
               <!-- BLOCK END-->
             
               </div>
            </div>
      </div>
      <!-- END ROW 1 -->
  </div>
  <script type="text/javascript" src="__STATIC__/js/content_addtop.js{$js_debug}"></script>
  <script type="text/javascript">
                  //编辑器路径定义
                  var editorURL = GV.DIMAUB;
  </script>
  <script type="text/javascript"  src="__STATIC__/js/ueditor/editor_config.js"></script>
  <script type="text/javascript"  src="__STATIC__/js/ueditor/editor_all_min.js"></script>

  <script type="text/javascript">

                  var editorcontent;
                  UE.commands['attachments'] = {
                    execCommand: function(cmd) {
                      flashupload('flashupload', '附件上传', 'content', ueAttachment, '10,,1,,,0', 'Contents', '12', 'd909680d11bb7090136c35b9b9d4e66d');
                    },
                    queryCommandState: function() {
                      return this.highlight ? -1 : 0;
                    }
                  };

                  $(function() {
                    //setInterval(function(){public_lock_renewal();}, 10000);
                    $(".J_ajax_close_btn").on('click', function(e) {
                      e.preventDefault();
                      Wind.use("artDialog", function() {
                        art.dialog({
                          id: "question",
                          icon: "question",
                          fixed: true,
                          lock: true,
                          background: "#CCCCCC",
                          opacity: 0,
                          content: "您确定需要关闭当前页面嘛？",
                          ok: function() {
                            setCookie("refersh_time", 1);
                            window.close();
                            return true;
                          }
                        });
                      });
                    });
                    /////---------------------
                    Wind.use('validate', 'ajaxForm', 'artDialog', function() {
                      //javascript

                      //编辑器
                      editorcontent = new baidu.editor.ui.Editor();
                      editorcontent.render('content');
                      try {
                        editorcontent.sync();
                      } catch (err) {
                      }
                      ;
                      //增加编辑器验证规则
                      jQuery.validator.addMethod('editorcontent', function() {
                        try {
                          editorcontent.sync();
                        } catch (err) {
                        }
                        ;
                        return editorcontent.hasContents();
                      });
                      var form = $('form.J_ajaxForms');
                      //ie处理placeholder提交问题
                      if ($.browser.msie) {
                        form.find('[placeholder]').each(function() {
                          var input = $(this);
                          if (input.val() == input.attr('placeholder')) {
                            input.val('');
                          }
                        });
                      }
                      //表单验证开始
                      form.validate({
                        //是否在获取焦点时验证
                        onfocusout: false,
                        //是否在敲击键盘时验证
                        onkeyup: false,
                        //当鼠标掉级时验证
                        onclick: false,
                        //验证错误
                        showErrors: function(errorMap, errorArr) {
                          //errorMap {'name':'错误信息'}
                          //errorArr [{'message':'错误信息',element:({})}]
                          try {
                            $(errorArr[0].element).focus();
                            art.dialog({
                              id: 'error',
                              icon: 'error',
                              lock: true,
                              fixed: true,
                              background: "#CCCCCC",
                              opacity: 0,
                              content: errorArr[0].message,
                              cancelVal: '确定',
                              cancel: function() {
                                $(errorArr[0].element).focus();
                              }
                            });
                          } catch (err) {
                          }
                        },
                        //验证规则
                        rules: {'post[post_title]': {required: 1}, 'post[post_content]': {editorcontent: true}},
                        //验证未通过提示消息
                        messages: {'post[post_title]': {required: '请输入标题'}, 'post[post_content]': {editorcontent: '内容不能为空'}},
                        //给未通过验证的元素加效果,闪烁等
                        highlight: false,
                        //是否在获取焦点时验证
                        onfocusout: false,
                            //验证通过，提交表单
                            submitHandler: function(forms) {
                              $(forms).ajaxSubmit({
                                url: form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
                                dataType: 'json',
                                beforeSubmit: function(arr, $form, options) {

                                },
                                success: function(data, statusText, xhr, $form) {
                                  if (data.status) {
                                    setCookie("refersh_time", 1);
                                    //添加成功
                                    Wind.use("artDialog", function() {
                                      art.dialog({
                                        id: "succeed",
                                        icon: "succeed",
                                        fixed: true,
                                        lock: true,
                                        background: "#CCCCCC",
                                        opacity: 0,
                                        content: data.info,
                                        button: [
                                          {
                                            name: '继续添加？',
                                            callback: function() {
                                              reloadPage(window);
                                              return true;
                                            },
                                            focus: true
                                          }, {
                                            name: '返回列表页',
                                            callback: function() {
                                              location = '__URL__';
                                              return true;
                                            }
                                          }
                                        ]
                                      });
                                    });
                                  } else {
                                    isalert(data.info);
                                  }
                                }
                              });
                            }
                      });
                    });
                    ////-------------------------
                  });
  </script> 
